package com.magicmovie.mapper;

import com.github.pagehelper.Page;
import com.magicmovie.entity.ViewHistory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

@Mapper
public interface ViewHistoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ViewHistory record);

    int insertSelective(ViewHistory record);

    ViewHistory selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ViewHistory record);

    int updateByPrimaryKey(ViewHistory record);

    ViewHistory findByCustomerAndMovie(@Param("customerId") Integer customerId,@Param("movieId") Integer movieId);

    Page<Map<String,Object>> findByCustomerId(Integer customerId);
}